home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17574 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.7 KB

  1. Path: pacbell.com!well!usenet
  2. From: sparker@well.com
  3. Newsgroups: comp.lang.java,comp.lang.c++,comp.lang.smalltalk
  4. Subject: Re: Will Java kill C++? (definition of strong typing)
  5. Date: 16 Apr 1996 15:43:20 GMT
  6. Organization: The Whole Earth 'Lectronic Link, Sausalito, CA
  7. Message-ID: <4l0f6o$sec@nkosi.well.com>
  8. References: <31682FFE.2781E494@bbn.com> <DpJyGG.FKK@hkuxb.hku.hk> <denatale-1004960822260001@grail1506.nando.net> <dbell-1104960125190001@wholder2.cts.com> <goochb.327.000893D1@rwi.com> <dbell-1104961159050001@wholder2.cts.com> <316D8523.74D7@concentric.net> <dbell-1 <3171810F.2E2@funsys.se>
  9. Reply-To: sparker@well.com
  10. NNTP-Posting-Host: sr-tty27-ppp.well.com
  11. X-Newsreader: IBM NewsReader/2 v1.2
  12.  
  13. In <3171810F.2E2@funsys.se>, rrg@funsys.se (Robin Rosenberg) writes:
  14. >Perhaps a side issue but my cents on the use and misuse of techical term.
  15. >
  16. [snips]
  17. >
  18. >We have been reading different books. My book (Eliis Horowitz: Fundamentals of 
  19. >Programming Languages, Springer Verlag, 1984) says (quote, p.38.) 
  20. >
  21. >"A language is said to be *strongly  typed* if the type of all expressions 
  22. > is known at compile-time". 
  23. >
  24. >Hence Smalltalk and LISP are *not* strongly typed.
  25. >
  26. >Perhaps you would like to refer to your source?
  27. >
  28. Well, we could all get into a battle of the books here. If we step back
  29. and look at the language terms used, the word 'strong' is both vague
  30. and perjorative - hey, who wants to use some wimpy 'weakly'-typed 
  31. language? The fact is that the strong/weak distinction (originally introduced
  32. to distinguish assembly languages from 'high-level' languages) was
  33. useful (see the date of your book) but has been obsoleted by developments
  34. in languages, concepts, operating systems and compiling techniques.
  35.  
  36. Instead of using the vague 'strong'/'weak' distinction, we should
  37. use some more precise distinctions and then take the discussion up from 
  38. there.
  39.  
  40. The pertinent distinctions would seem to be:
  41.  
  42. *How* typing takes place - the static/dynamic distinction.
  43. *When* typing takes place - the early/late distinction.
  44. *Breadth* of typing - how wide/narrow are the types handled
  45. by the language? For example C and COBOL have only a handful
  46. of types. Languages such as C++, ST, and Java, whose class
  47. mechanism allows user-definition of types can permit finer
  48. distinction of types. Eg in C a string can represent both an
  49. address or a set of modem initialization instructions, and this
  50. is the only way to implement them. In an OO language, different
  51. classes can represent the two. I would judge the latter set of
  52. languages to have a 'narrower' typing mechanism than the former.
  53. >
  54. >-- 
  55. >Robin Rosenberg
  56.  
  57.  
  58. Steve Parker
  59.  
  60. ***************************************************************************
  61. "It would make him physically ill to think of programming in C++"
  62.  - Donald Knuth on Edsgar Dijkstra
  63.  
  64.